<?php
namespace Api\Controller;
use Think\Controller;

class ApibaseController extends Controller
{
    function success($data,$message){
        $ret=array(
            code=>0,
            message=>$message,
            data=>$data
        );
        $this->ajaxReturn($ret);
    }

    function error($errno,$message){
        $ret=array(
            code=>errno,
            message=>$message,
            data=>null
        );
        $this->ajaxReturn($ret);
    }
}